home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Extras / IFF / Old_IFF_Packages / November_1988 / Examples / PGTB / catch.doc < prev    next >
Encoding:
Text File  |  1988-12-12  |  1.8 KB  |  65 lines

  1. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  2. * |_o_o|\\  The Software Distillery                    *
  3. * |. o.| || Made available to the Amiga development community        *
  4. * | .  | || the author:                      BBS:    *
  5. * | o  | ||   Jim Cooper                (919)-471-6436  *
  6. * |  . |//                                *
  7. * ======                                *
  8. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  9.  
  10. There are four extras which can be done with the catcher, none of which are
  11. required.
  12.  
  13. If you want the catcher to clean up after you, use the _ONEXIT function in
  14. Lattice.
  15.  
  16. If you wish to write a section of your own data to the SnapShot file, use
  17. the following format:
  18.  
  19. ---in your initialization,
  20.  
  21. _ONGURU = (APTR)<function name>;
  22.  
  23. ---in your data definition,
  24.  
  25. extern APTR _ONGURU;
  26.  
  27. ---and---
  28.  
  29. void <function name>(fp)
  30. long fp;
  31.  
  32. or, in other words, create a void function which takes a single parameter
  33. -- an AmigaDOS File Handle.  Use the AmigaDOS 'Write' call to write
  34. anything you wish to this file; the catcher will handle padding to long
  35. word boundaries and closing the SnapShot file.
  36.  
  37. If you wish the catcher to report the memory usage at the time of the
  38. crash, include the following:
  39.  
  40. extern long _FMEM;
  41.  
  42. and in your initialization,
  43.  
  44. _FMEM = 1;    /* or any non-zero value */
  45.  
  46.  
  47. The last option is to include the following:
  48.  
  49. extern ULONG _STAKOffset;
  50.  
  51. and in your initialization,
  52.  
  53. _STAKOffset = n     /* n is the # of bytes of stack you want reported */
  54.  
  55. If n is larger than the amount of stack used, you will only get a whole
  56. stack dump.  This is only necessary if you wish to have more than 8K bytes
  57. of stack dumped, otherwise the default STAK format will dump the entire
  58. stack anyway.
  59.  
  60.  
  61. These options are only necessary if the default data will not supply the
  62. information you require, although using the _ONEXIT function is recommended if
  63. you wish to be nice to the system and clean up after yourself.
  64.  
  65.